package com.leigang.swagger.config;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author leigang
 * @description: 动态数据源配置常量
 * @date 20/8/12  21:56
 */
public class DataSourceTypeConstant {
    public static final String USERNAME = "username";
    public static final String URL = "jdbc-url";
    public static final String PASSWORD = "password";

    public static final String MASTER = "master";


    public static final String ENV_NAME = "spring.datasource.%s.%s";
    public static final String DEFAULT_ENV_NAME = "spring.datasource.%s";


    public static final String SLAVE = "slave";

    public static final String DRIVER = "com.mysql.cj.jdbc.Driver";

    public static List<String> ALL_DATASOURCE = Lists.newArrayList();

    static {
        ALL_DATASOURCE.add(MASTER);
        ALL_DATASOURCE.add(SLAVE);

    }

}
